<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>

</body>
<script type="text/javascript">
    // 为抵抗洪水，战士连续作战89小时，编程计算共多少天零多少小时？
    var hours = 89; // 总小时数;
    var day = parseInt(89 / 24);
    var h = 89 % 24;
    console.log(day + '天' + h + '小时')
</script>

</html>